document.onreadystatechange = loadingf;
function loadingf() {
    if(document.readyState == "complete"){
        $('#loading').fadeOut();
    }
}
